<?php

use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
 */

// 微信小程序
Route::post('mini_program/login', 'WeChatController@miniProgramLogin');
Route::get('mini_program/logout', 'WeChatController@logout');

/**
 * 信息流
 */
// Route::get('government', 'GovernmentInfoController@index');
Route::resource('government', 'GovernmentInfoController', ['only' => ['index', 'show']]);

Route::get('system/module', 'SystemModuleInfoController@index');

Route::resource('culture/voice', 'CultureVoiceController', ['only' => ['index', 'show']]);

// 精彩直播
Route::resource('live', 'LiveController', ['only' => ['index', 'show']]);
// 点播
Route::resource('video', 'VideoController', ['only' => ['index', 'show']]);
// 资讯
Route::get('news', 'NewsController@index');
Route::get('news/info', 'NewsController@show');
// 非遗
Route::resource('cultural/heritage', 'CulturalHeritageController', ['only' => ['index', 'show']]);
// 首页非遗
Route::get('home/cultural', 'CulturalHeritageController@home');
// 非遗类型
Route::get('heritage/type', 'CulturalHeritageTypeController@index');
// 分馆
Route::get('branch', 'BranchController@index');
Route::get('branch/detail', 'BranchController@show');
Route::get('branch/info', 'BranchInfoController@index');
Route::get('branch/info/detail', 'BranchInfoController@show');

// 场馆
Route::get('venue', 'VenueController@index');
Route::get('venue/day', 'VenueController@show');

// 场馆预约人
Route::resource('meet/person', 'MeetPersonController');
// 场馆预约提交
Route::post('meet', 'MeetOrderController@store');
// 查询场馆预约记录
Route::get('meet', 'MeetOrderController@show');
// 取消预约记录
Route::put('meet', 'MeetOrderController@cancel');

// 活动
Route::resource('activity', 'ActivityController', ['only' => ['index', 'show']]);
Route::post('activity/form', 'ActivityFormController@store');
// 我参与的活动
Route::get('activities/my', 'ActivityFormController@my');

// 志愿活动
Route::resource('volunteer/activity', 'VolunteerActivityController', ['only' => ['index', 'show']]);
Route::post('volunteer/form', 'VolunteerFormController@store');
// 我参与的志愿活动
Route::get('volunteer/my', 'VolunteerFormController@my');

// 我的审核日志小红点
Route::get('auditlog/my', 'OrderAuditLogController@my');
Route::post('auditlog/submit', 'OrderAuditLogController@submit');

// 头像上传
Route::post('avatar/upload', 'UploadController@upload');
// 用户信息修改
Route::post('user/info', 'WeChatController@update');


